﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FillCartridgeBBB.Models.Department>>" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Підрозділи</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <form id="form1" runat="server">

    <h2>Підрозділи</h2>
    <%
       ViewData["Type"] = "Edit";
       Html.RenderPartial("DepartmentList", Model, ViewData); %>
    
        <%--<table>
        <tr>
            <th></th>
            <th>
                DepartmentId
            </th>
            <th>
                Name
            </th>
            <th>
                Adress
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id=item.DepartmentId }) %> |
                <%= Html.ActionLink("Details", "Details", new { id=item.DepartmentId })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id=item.DepartmentId })%>
            </td>
            <td>
                <%= Html.Encode(item.DepartmentId) %>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
            <td>
                <%= Html.Encode(item.Adress) %>
            </td>
        </tr>
    
    <% } %>

    </table>--%>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>

    </p>

    </form>

</asp:Content>

